#include "imageprovider.h"
#include <QtGui>

ImageProvider::ImageProvider()
: QDeclarativeImageProvider(QDeclarativeImageProvider::Pixmap),
  movie(":/icons/activity.gif", "gif") {
      movie.start();
}

QPixmap ImageProvider::requestPixmap ( const QString & id, QSize * size, const QSize & requestedSize ) {
    if (id == "current") {
        QPixmap pm = movie.currentPixmap();
        *size = pm.size();
        return pm;
    }
    else return QPixmap();
}
